package com.spzx.product.service;

/**
 * @Author GQS @Date 2024/9/20/21:15 @Description
 */

import com.baomidou.mybatisplus.extension.service.IService;
import com.spzx.product.api.domain.*;
import com.spzx.product.api.domain.vo.SkuLockVo;
import com.spzx.product.api.domain.vo.SkuStockVo;

import java.util.List;
import java.util.Map;

/**
 * 商品Service接口
 */
public interface ProductService extends IService<Product> {


    /**
     * 查询商品列表
     *
     * @param product 商品
     * @return 商品集合
     */
    List<Product> selectProductList(Product product);

    int insertProduct(Product product);

    Product selectProductById(Long id);

    int updateProduct(Product product);

    int deleteProductByIds(Long[] ids);

    void updateAuditStatus(Long id, Integer auditStatus);

    void updateStatus(Long id, Integer status);

    List<ProductSku> getTopSale();

    List<ProductSku> selectProductSkuList(SkuQuery skuQuery);

    ProductSku getProductSku(Long skuId);

    Product getProduct(Long id);

    SkuPrice getSkuPrice(Long skuId);

    ProductDetails getProductDetails(Long id);

    Map<String, Long> getSkuSpecValue(Long id);

    SkuStockVo getSkuStock(Long skuId);

    List<SkuPrice> getSkuPriceList(List<Long> skuIdList);

    String checkAndLock(String orderNo, List<SkuLockVo> skuLockVoList);

    void unlockStock(String orderNo);

    void minus(String orderNo);
}
